package ru.spbsu.electromenu.model;

import ru.spbsu.electromenu.util.collections.Idable;

import java.util.Map;

/**
 * Date: 3/19/11
 * Time: 4:52 PM
 *
 * @author Artem Titov
 */
public class Dish implements Idable {
    private int id = -1;
    private String name = null;
    private String description = null;
    private double price = 0;
    private String image = null;
    private int tagId = -1;
    private Tag tag = null;
    private boolean available = false;

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public double getPrice() {
        return price;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public String getImage() {
        return image;
    }

    public void setImage(String image) {
        this.image = image;
    }

    public int getTagId() {
        return tagId;
    }

    public void setTagId(int tagId) {
        this.tagId = tagId;
    }

    public boolean isAvailable() {
        return available;
    }

    public void setAvailable(boolean available) {
        this.available = available;
    }

    public Tag getTag() {
        return this.tag;
    }

    public void injectTag(final Map<Integer, Tag> tags) {
        this.tag = tags.get(this.tagId);
    }
}
